﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="urn:schemas-microsoft-com:windows:storage:mapping:CS" 
           attributeFormDefault="unqualified" 
           elementFormDefault="qualified" 
           targetNamespace="urn:schemas-microsoft-com:windows:storage:mapping:CS" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="Mapping">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="EntityContainerMapping">
               <xs:complexType>
                  <xs:sequence>
                     <xs:element maxOccurs="unbounded" name="EntitySetMapping">
                        <xs:complexType>
                           <xs:sequence>
                              <xs:element name="EntityTypeMapping">
                                 <xs:complexType>
                                    <xs:sequence>
                                       <xs:element name="MappingFragment">
                                          <xs:complexType>
                                             <xs:sequence>
                                                <xs:element maxOccurs="unbounded" name="ScalarProperty">
                                                   <xs:complexType>
                                                      <xs:attribute name="Name" type="xs:string" use="required" />
                                                      <xs:attribute name="ColumnName" type="xs:string" use="required" />
                                                   </xs:complexType>
                                                </xs:element>
                                             </xs:sequence>
                                             <xs:attribute name="StoreEntitySet" type="xs:string" use="required" />
                                          </xs:complexType>
                                       </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="TypeName" type="xs:string" use="required" />
                                 </xs:complexType>
                              </xs:element>
                           </xs:sequence>
                           <xs:attribute name="Name" type="xs:string" use="required" />
                        </xs:complexType>
                     </xs:element>
                     <xs:element maxOccurs="unbounded" name="AssociationSetMapping">
                        <xs:complexType>
                           <xs:sequence>
                              <xs:element maxOccurs="unbounded" name="EndProperty">
                                 <xs:complexType>
                                    <xs:sequence>
                                       <xs:element maxOccurs="unbounded" name="ScalarProperty">
                                          <xs:complexType>
                                             <xs:attribute name="Name" type="xs:string" use="required" />
                                             <xs:attribute name="ColumnName" type="xs:string" use="required" />
                                          </xs:complexType>
                                       </xs:element>
                                    </xs:sequence>
                                    <xs:attribute name="Name" type="xs:string" use="required" />
                                 </xs:complexType>
                              </xs:element>
                              <xs:element name="Condition">
                                 <xs:complexType>
                                    <xs:attribute name="ColumnName" type="xs:string" use="required" />
                                    <xs:attribute name="IsNull" type="xs:boolean" use="required" />
                                 </xs:complexType>
                              </xs:element>
                           </xs:sequence>
                           <xs:attribute name="Name" type="xs:string" use="required" />
                           <xs:attribute name="TypeName" type="xs:string" use="required" />
                           <xs:attribute name="StoreEntitySet" type="xs:string" use="required" />
                        </xs:complexType>
                     </xs:element>
                  </xs:sequence>
                  <xs:attribute name="StorageEntityContainer" type="xs:string" use="required" />
                  <xs:attribute name="CdmEntityContainer" type="xs:string" use="required" />
               </xs:complexType>
            </xs:element>
         </xs:sequence>
         <xs:attribute name="Space" type="xs:string" use="required" />
      </xs:complexType>
   </xs:element>
</xs:schema>